package com.example.nuc_ms_beta.ui.viewconstruction.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.nuc_ms_beta.R;
import com.example.nuc_ms_beta.app.MyApplication;
import com.example.nuc_ms_beta.bean.videofragment.Video;
import com.yuyh.easyadapter.abslistview.EasyLVAdapter;
import com.yuyh.easyadapter.abslistview.EasyLVHolder;

import java.util.List;

/**
 * Created by bnhc on 17-6-4.
 */

public class VideoListViewAdapter extends EasyLVAdapter<Video> {
    public VideoListViewAdapter(Context context, List<Video> list, int... layoutIds) {
        super(context, list, layoutIds);
    }

    @Override
    public void convert(EasyLVHolder holder, int position, Video video) {
        Glide.with(MyApplication.context).load(video.getImage().getUrl()).into((ImageView) holder.getView(R.id.fragment_video_item_iv));
    }
}
